import ListEmptyNone from '@/components/antd-comp/empty/emptyNone'
import '../css/styles.less'

export default function ApplicationLoadInfo({ type = '', url = '' }) {
  return (
    <div className="flexCol ApplicationLoadInfo_case">
      <div className="flexRow flexCol">
        {/* head */}
        <div className="flexRowStart">
          {type === 'PC' && (
            <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
              <path
                d="M6.74 8.385V13.859L1 13.075V8.392H6.74V8.385ZM6.74 2.134V7.678H1V2.925L6.74 2.134ZM15 8.385V15L7.37 13.95V8.392H15V8.385ZM15 1V7.678H7.37V2.05L15 1Z"
                fill="#040000"
              />
            </svg>
          )}
          <span className="ApplicationLoadInfo_caseName"> {type === 'PC' ? 'Windows版' : '扫码体验'}</span>
        </div>
        {/* img */}
        {type === 'PC' ? (
          <img src="/pcImg.jpg" style={{ margin: '12px 0 16px', width: '53px', height: '52px' }} alt="" />
        ) : (
          <div className="ApplicationLoadInfo_qrcode flexRow">
            {url ? (
              <img src={url} alt="" className="ApplicationLoadInfo_qrcode_wx" />
            ) : (
              <ListEmptyNone style={{ margin: '10px 0' }} />
            )}
          </div>
        )}
        {/* fouter */}
        {type === 'PC' ? (
          <div className="ApplicationLoadInfo_btn flexRow" onClick={() => {}}>
            <a href={'https://smbfile.itplace.com.cn/historyversion/AI/MiGu_Baiying_AI.exe'}>立即下载</a>
          </div>
        ) : null}
      </div>
    </div>
  )
}
